package com.tx.studentManager.service;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tx.studentManager.dao.DepartmentDao;
import com.tx.studentManager.model.Department;
import com.tx.studentManager.qo.DepartmentQO;
/**
 * 
* @描述 院系操作
* @since studentManager-admin 1.0
* @version 1.0 2015-9-14 下午3:04:42
* @author 此生唯晴
 */
@Service
@Transactional
public class DepartmentService extends BaseService<Department, String, DepartmentDao, DepartmentQO> {
	@Resource
	private DepartmentDao departmentDao;
	@Override
	protected DepartmentDao getDao() {
		return departmentDao;
	}
	@Override
	public Department insert(Department model) {
		if (model.getCreateDate()==null) {
			model.setCreateDate(new Date());
		}
		return super.insert(model);
	}

}
